<meta title="分类淘宝导购选品库批量添加" width="1000"/>
<style>
</style>
<div class="p">
    <form s="valid,form,nda,datac"
          s-data="itemSelection"
          method="post"
          id="form" class="form-horizontal">
        <table class="table table-striped table-hover table-bordered">
            <tr>
                <th>名称</th>
                <th>类目</th>
                <th>抓取页数</th>
                <th>起始价</th>
                <th>结束价</th>
                <th>查询关键字</th>
                <th>淘宝类目</th>
                <th>佣金比率下限</th>
                <th>佣金比率上限</th>
                <th>排序</th>
                <th>优惠券</th>
                <th>操作</th>
            </tr>
            <tr>
                <td>
                    <input type="text" class="form-control" name="" />
                </td>
                <td>
                    <span name="shopcatName"></span>
                    <input type="hidden" class="form-control" name="shopcatId" />
                </td>
                <td>
                    <input autocomplete="off" type="number" name="maxPage" value="10" min="1" s-valid-error="require(),number()" class="form-control" />
                </td>
                <td>
                    <input autocomplete="off" type="number" name="startPrice" s-valid-error="number()" class="form-control"/>
                </td>
                <td>
                    <input autocomplete="off" type="number" s-valid-error="require()" name="endPrice" s-valid-error="number()" class="form-control"/>
                </td>
                <td>
                    <input autocomplete="off" type="text" style="width: 100%" name="q" class="form-control"/>
                </td>
                <td>
                    <div class="input-group" style="width: 100%">
                        <input autocomplete="off" type="text" name="cat" id="cat" class="form-control"/>
                        <div class="input-group-btn">
                            <input type="button" class="btn btn-default" value="选择" s-click="selectTopItemCat(this)"/>
                        </div>

                    </div>
                    <div class="help-block">用,分割，最大10个，该ID可以通过taobao.itemcats.get接口获取到</div>
                </td>
                <td>
                    <input autocomplete="off" type="number" value="2000" name="startTkRate" placeholder="2000表示20.00%" s-valid-error="number()" class="form-control"/>
                </td>
                <td>
                    <input autocomplete="off" type="number" name="endTkRate" placeholder="3000表示30.00%" s-valid-error="number()" class="form-control"/>
                </td>
                <td>
                    <select class="form-control" s="select"
                            name="sort"
                            s-build="S.get('/api/enum/valuesMap/core.enums.TbkDgMaterialOptionalSort')">
                        <option value="">默认排序</option>
                    </select>
                </td>
                <td>
                    <label class="s-checkbox-switch">
                        <input autocomplete="off" checked type="checkbox" name="hasCoupon" value="true" />
                        <span class="s-checkbox-indicator"></span>
                    </label>
                </td>
                <td>

                </td>
            </tr>
        </table>
    </form>
</div>
<script>
    S.meta.btns = [
        {
            name: "确定",
            style: "btn btn-primary",
            click: function() {
                $configPanel.getConfig().done(function(rs) {
                    $config.node.val(JSON.stringify(rs));
                    $form.submit().done(function() {
                        S.close(true)
                    })
                })
            }
        },
        {
            name: "关闭",
            style: "btn btn-default",
            click: function() {
                S.close();
            }
        }
    ]

</script>